#ifndef COMMENT_H_
#define COMMENT_H_

#include <iostream>
#include <dirent.h>
#include <string.h>
#include <vector>

#include <cv.h>
#include <highgui.h>
#include <ml.h>
#include <opencv2/legacy/legacy.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/nonfree/nonfree.hpp>

#include "svm.h"

using namespace cv;
using namespace std;

struct ImagePathInfo{
	string path;
	string fullname;
};

static const int c_nBowClusterCount = 100;

char trainFolderPath[] = "label";
char imageSIFTFeatureFileName[] = "siftFeature.xml";
char imageSURFFeatureFileName[] = "surfFeature.xml";

char siftBOWVocabulary[] = "siftBOWVocabulary.xml";
char surfBOWVocabulary[] = "surfBOWVocabulary.xml";

char siftBOWFeature[] = "siftBOWFeature.xml";
char surfBOWFeature[] = "surfBOWFeature.xml";

void loadImages(const char *path , vector<ImagePathInfo>& imageList) ;

void getSIFTImagesFeature(vector<ImagePathInfo> imageList, char *filefullname);
void getSURFImagesFeature(vector<ImagePathInfo> imageList, char *filefullname);

void makeSIFTBOWVocabulary(vector<ImagePathInfo> imageList, char *featurefilename ,char *bowfilename);
void makeSURFBOWVocabulary(vector<ImagePathInfo> imageList, char *featurefilename ,char *bowfilename);

void makeSIFTBOWFeature(vector<ImagePathInfo> imageList, char *bowfilename , char *siftbowfile);
void makeSURFBOWFeature(vector<ImagePathInfo> imageList, char *bowfilename , char *surfbowfile);

void makeSIFTLibSVMClasser();

#endif /* COMMENT_H_ */
